package api

import (
	"community_end/model"
	"community_end/utils/errmsg"
	"github.com/gin-gonic/gin"
	"net/http"
)

func SelectAllPromotion(ctx *gin.Context) {
	promotions, code := model.SelectAllPromotion()
	ctx.JSON(http.StatusOK, gin.H{
		"code": code,
		"msg":  errmsg.GetErrMsg(code),
		"data": promotions,
	})
}
